<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atcacert_date.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00185.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">atcacert_date.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Date handling with regard to certificates.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="a00188_source.html">atcacert_date.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaab946b2ea5dba6d1addacc995a6989ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gaab946b2ea5dba6d1addacc995a6989ae">atcacert_date_enc</a> (<a class="el" href="a00990.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> format, const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t *formatted_date, size_t *formatted_date_size)</td></tr>
<tr class="memdesc:gaab946b2ea5dba6d1addacc995a6989ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a timestamp according to the format type.  <a href="a00990.html#gaab946b2ea5dba6d1addacc995a6989ae">More...</a><br /></td></tr>
<tr class="separator:gaab946b2ea5dba6d1addacc995a6989ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga368d038c02673b1e6ddacfd175786e6a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga368d038c02673b1e6ddacfd175786e6a">atcacert_date_dec</a> (<a class="el" href="a00990.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> format, const uint8_t *formatted_date, size_t formatted_date_size, <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="memdesc:ga368d038c02673b1e6ddacfd175786e6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a formatted timestamp according to the specified format.  <a href="a00990.html#ga368d038c02673b1e6ddacfd175786e6a">More...</a><br /></td></tr>
<tr class="separator:ga368d038c02673b1e6ddacfd175786e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d267b06c94e1db2aa2f6e91df1c843f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga1d267b06c94e1db2aa2f6e91df1c843f">atcacert_date_get_max_date</a> (<a class="el" href="a00990.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> format, <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="memdesc:ga1d267b06c94e1db2aa2f6e91df1c843f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the maximum date available for the given format.  <a href="a00990.html#ga1d267b06c94e1db2aa2f6e91df1c843f">More...</a><br /></td></tr>
<tr class="separator:ga1d267b06c94e1db2aa2f6e91df1c843f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae40aeb71d824e8bbe3233e86f3fb6a3f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gae40aeb71d824e8bbe3233e86f3fb6a3f">atcacert_date_enc_iso8601_sep</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t formatted_date[<a class="el" href="a00990.html#ga4cd9a96f5434fa3bc256878031d63846">DATEFMT_ISO8601_SEP_SIZE</a>])</td></tr>
<tr class="separator:gae40aeb71d824e8bbe3233e86f3fb6a3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ff21be0f011ce56dfde5e2ac99e17ce"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga3ff21be0f011ce56dfde5e2ac99e17ce">atcacert_date_dec_iso8601_sep</a> (const uint8_t formatted_date[<a class="el" href="a00990.html#ga4cd9a96f5434fa3bc256878031d63846">DATEFMT_ISO8601_SEP_SIZE</a>], <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="separator:ga3ff21be0f011ce56dfde5e2ac99e17ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa83e2f3a3f83b321dade6cd3211136db"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gaa83e2f3a3f83b321dade6cd3211136db">atcacert_date_enc_rfc5280_utc</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t formatted_date[<a class="el" href="a00990.html#ga420f3d438f3f8f7c140512910e54d09a">DATEFMT_RFC5280_UTC_SIZE</a>])</td></tr>
<tr class="separator:gaa83e2f3a3f83b321dade6cd3211136db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7fa37d88f9405a3557110e58468f9e6e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga7fa37d88f9405a3557110e58468f9e6e">atcacert_date_dec_rfc5280_utc</a> (const uint8_t formatted_date[<a class="el" href="a00990.html#ga420f3d438f3f8f7c140512910e54d09a">DATEFMT_RFC5280_UTC_SIZE</a>], <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="separator:ga7fa37d88f9405a3557110e58468f9e6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaeb955dfc5b73719e2ecca542c2fc249"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gaaeb955dfc5b73719e2ecca542c2fc249">atcacert_date_enc_rfc5280_gen</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t formatted_date[<a class="el" href="a00990.html#gae058e0e8944f408fa251bc4f4136d79c">DATEFMT_RFC5280_GEN_SIZE</a>])</td></tr>
<tr class="separator:gaaeb955dfc5b73719e2ecca542c2fc249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadd219151c074c3ec7785d68741a1cae1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gadd219151c074c3ec7785d68741a1cae1">atcacert_date_dec_rfc5280_gen</a> (const uint8_t formatted_date[<a class="el" href="a00990.html#gae058e0e8944f408fa251bc4f4136d79c">DATEFMT_RFC5280_GEN_SIZE</a>], <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="separator:gadd219151c074c3ec7785d68741a1cae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1160e4293d7831e15a47e7b3f47013ca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga1160e4293d7831e15a47e7b3f47013ca">atcacert_date_enc_posix_uint32_be</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t formatted_date[<a class="el" href="a00990.html#gafe13e835d79405f28daa3449f732ebcd">DATEFMT_POSIX_UINT32_BE_SIZE</a>])</td></tr>
<tr class="separator:ga1160e4293d7831e15a47e7b3f47013ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37893ca05c0e3ccbcec3725228b8a818"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga37893ca05c0e3ccbcec3725228b8a818">atcacert_date_dec_posix_uint32_be</a> (const uint8_t formatted_date[<a class="el" href="a00990.html#gafe13e835d79405f28daa3449f732ebcd">DATEFMT_POSIX_UINT32_BE_SIZE</a>], <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="separator:ga37893ca05c0e3ccbcec3725228b8a818"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4825cb7a817fa9471cfe30a1aa984b8f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga4825cb7a817fa9471cfe30a1aa984b8f">atcacert_date_enc_posix_uint32_le</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp, uint8_t formatted_date[<a class="el" href="a00990.html#gaa7c545ab9944dc7261d689680e2b00f4">DATEFMT_POSIX_UINT32_LE_SIZE</a>])</td></tr>
<tr class="separator:ga4825cb7a817fa9471cfe30a1aa984b8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5bbaaf84f1c19409ee276241e9e2f6d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gab5bbaaf84f1c19409ee276241e9e2f6d">atcacert_date_dec_posix_uint32_le</a> (const uint8_t formatted_date[<a class="el" href="a00990.html#gaa7c545ab9944dc7261d689680e2b00f4">DATEFMT_POSIX_UINT32_LE_SIZE</a>], <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *timestamp)</td></tr>
<tr class="separator:gab5bbaaf84f1c19409ee276241e9e2f6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5da5a0589a6168aafd34b4aac4e07553"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga5da5a0589a6168aafd34b4aac4e07553">atcacert_date_enc_compcert</a> (const <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *issue_date, uint8_t expire_years, uint8_t enc_dates[3])</td></tr>
<tr class="memdesc:ga5da5a0589a6168aafd34b4aac4e07553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode the issue and expire dates in the format used by the compressed certificate.  <a href="a00990.html#ga5da5a0589a6168aafd34b4aac4e07553">More...</a><br /></td></tr>
<tr class="separator:ga5da5a0589a6168aafd34b4aac4e07553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba31331bcfab203c786004b027512fab"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#gaba31331bcfab203c786004b027512fab">atcacert_date_dec_compcert</a> (const uint8_t enc_dates[3], <a class="el" href="a00990.html#ga7f389df0f74fd3593ab7e3a4d380433f">atcacert_date_format_t</a> expire_date_format, <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *issue_date, <a class="el" href="a00990.html#ga81a3a91e9aa4aca39ca6fe8a7a94b121">atcacert_tm_utc_t</a> *expire_date)</td></tr>
<tr class="memdesc:gaba31331bcfab203c786004b027512fab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode the issue and expire dates from the format used by the compressed certificate.  <a href="a00990.html#gaba31331bcfab203c786004b027512fab">More...</a><br /></td></tr>
<tr class="separator:gaba31331bcfab203c786004b027512fab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga8b93faeabd399250750a5ed9401d897e"><td class="memItemLeft" align="right" valign="top">const size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00990.html#ga8b93faeabd399250750a5ed9401d897e">ATCACERT_DATE_FORMAT_SIZES</a> [<a class="el" href="a00990.html#ga82737078e820e6d6beeca7466841e43d">ATCACERT_DATE_FORMAT_SIZES_COUNT</a>]</td></tr>
<tr class="separator:ga8b93faeabd399250750a5ed9401d897e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Date handling with regard to certificates. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>(c) 2015-2018 Microchip Technology Inc. and its subsidiaries. </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_26647cdac0a1f8c717d44b4eb3b4ec89.html">atcacert</a></li><li class="navelem"><a class="el" href="a00185.html">atcacert_date.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
